package com.pearadmin.system.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pearadmin.common.web.domain.request.PageDomain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pearadmin.system.mapper.TeacherAnalysisImprovementMapper;
import com.pearadmin.system.domain.TeacherAnalysisImprovement;
import com.pearadmin.system.service.ITeacherAnalysisImprovementService;

/**
 * 任课教师分析与改进Service业务层处理
 * 
 * @author jmys
 * @date 2021-04-12
 */
@Service
public class TeacherAnalysisImprovementServiceImpl implements ITeacherAnalysisImprovementService 
{
    @Autowired
    private TeacherAnalysisImprovementMapper teacherAnalysisImprovementMapper;

    /**
     * 查询任课教师分析与改进
     * 
     * @param id 任课教师分析与改进ID
     * @return 任课教师分析与改进
     */
    @Override
    public TeacherAnalysisImprovement selectTeacherAnalysisImprovementById(Long id)
    {
        return teacherAnalysisImprovementMapper.selectTeacherAnalysisImprovementById(id);
    }

    /**
     * 查询任课教师分析与改进列表
     * 
     * @param teacherAnalysisImprovement 任课教师分析与改进
     * @return 任课教师分析与改进
     */
    @Override
    public List<TeacherAnalysisImprovement> selectTeacherAnalysisImprovementList(TeacherAnalysisImprovement teacherAnalysisImprovement)
    {
        return teacherAnalysisImprovementMapper.selectTeacherAnalysisImprovementList(teacherAnalysisImprovement);
    }

    /**
     * 查询任课教师分析与改进
     * @param teacherAnalysisImprovement 任课教师分析与改进
     * @param pageDomain
     * @return 任课教师分析与改进 分页集合
     * */
    @Override
    public PageInfo<TeacherAnalysisImprovement> selectTeacherAnalysisImprovementPage(TeacherAnalysisImprovement teacherAnalysisImprovement, PageDomain pageDomain)
    {
        PageHelper.startPage(pageDomain.getPage(),pageDomain.getLimit());
        List<TeacherAnalysisImprovement> data = teacherAnalysisImprovementMapper.selectTeacherAnalysisImprovementList(teacherAnalysisImprovement);
        return new PageInfo<>(data);
    }

    /**
     * 新增任课教师分析与改进
     * 
     * @param teacherAnalysisImprovement 任课教师分析与改进
     * @return 结果
     */

    @Override
    public int insertTeacherAnalysisImprovement(TeacherAnalysisImprovement teacherAnalysisImprovement)
    {
        return teacherAnalysisImprovementMapper.insertTeacherAnalysisImprovement(teacherAnalysisImprovement);
    }

    /**
     * 修改任课教师分析与改进
     * 
     * @param teacherAnalysisImprovement 任课教师分析与改进
     * @return 结果
     */
    @Override
    public int updateTeacherAnalysisImprovement(TeacherAnalysisImprovement teacherAnalysisImprovement)
    {
        return teacherAnalysisImprovementMapper.updateTeacherAnalysisImprovement(teacherAnalysisImprovement);
    }

    /**
     * 删除任课教师分析与改进对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTeacherAnalysisImprovementByIds(String[] ids)
    {
        return teacherAnalysisImprovementMapper.deleteTeacherAnalysisImprovementByIds(ids);
    }

    /**
     * 删除任课教师分析与改进信息
     * 
     * @param id 任课教师分析与改进ID
     * @return 结果
     */
    @Override
    public int deleteTeacherAnalysisImprovementById(Long id)
    {
        return teacherAnalysisImprovementMapper.deleteTeacherAnalysisImprovementById(id);
    }
}
